<template>
	<view class="login hh100 d-c-c d-c">
		<view class="pl30 pr30 ww100">
			<view class="title orange f48">利洁能源，欢迎您</view>
			<view class="item mt80 pl20 d-s-c br12">
				<input type="number" maxlength="11" placeholder="请输入手机号" class="input" />
			</view>
			<view class="item mt20 pl20 pr20 d-s-c br12">
				<input class="flex-1" type="text" placeholder="请输入验证码" />
				<view class="code blue f24">获取验证码</view>
			</view>
			<view class="tr f24 mb60 mt20">立即注册</view>
			<u-button shape="circle" color="#FF7E11" text="登录"></u-button>
			<label class="radio d-c-c mt40 f22 gray9">
				<radio :checked="isReed" color="#1156FA" />登录/注册代表您已同意<text class="blue">《利洁能源用户协议及隐私》</text>
			</label>
		</view>
		<view class="pos f22 d-c-c d-c">
			<u-loadmore loadmoreText='其他登录方式' line line-color="#878787" />
			<image class="mt10" src="@/static/image/wechar.png" mode="widthFix"></image>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				isReed: false,
				tips: '',
				seconds: 60,
			}
		},
		methods: {
			codeChange(text) {
				this.tips = text;
			},
			getCode() {
				if (this.$refs.uCode.canGetCode) {
					// 模拟向后端请求验证码
					uni.showLoading({
						title: '正在获取验证码'
					})
					setTimeout(() => {
						uni.hideLoading();
						// 这里此提示会被this.start()方法中的提示覆盖
						uni.$u.toast('验证码已发送');
						// 通知验证码组件内部开始倒计时
						this.$refs.uCode.start();
					}, 2000);
				} else {
					uni.$u.toast('倒计时结束后再发送');
				}
			},
			login() {

			},
			back() {
				uni.navigateBack()
			}
		}
	}
</script>

<style scoped lang="scss">
	.item {
		background-color: #fff;
		height: 100rpx;
		// padding: ;
	}

	.login {
		background-position: -60vw -60vh;
		background-repeat: no-repeat;
		background-size: cover;
		// max-height: 100vh;
		height: 100vh;
		width: 100vw;
		background-color: #f4f4f4;
	}

	.pos {
		position: fixed;
		bottom: 40px;

		image {
			width: 80rpx;
		}
	}
</style>